//
//  UILabel+WYAddition.m
//  WYTools
//
//  Created by 吴熠 on 17/1/25.
//  Copyright © 2017年 吴熠. All rights reserved.
//

#import "UILabel+WYAddition.h"

@implementation UILabel (WYAddition)

//+ (instancetype)wy_labelWithText:(NSString *)text fontSize:(CGFloat)fontSize color:(UIColor *)color {
//    UILabel *label = [[self alloc] init];
//    
//    label.text = text;
//    label.font = [UIFont systemFontOfSize:fontSize];
//    label.textColor = color;
//    label.numberOfLines = 0;
//    
//    return label;
//}

+ (instancetype)wy_labelWithText:(NSString *)text regularFontWithSize:(CGFloat)fontSize color:(UIColor *)color
{
    UILabel *label = [[self alloc] init];
    
    label.text = text;
    label.font = [UIFont regularFontWithSize:fontSize];
    label.textColor = color;
    return label;
}

+ (instancetype)wy_labelWithText:(NSString *)text mediumFontWithSize:(CGFloat)fontSize color:(UIColor *)color
{
    UILabel *label = [[self alloc] init];
    
    label.text = text;
    label.font = [UIFont mediumFontWithSize:fontSize];
    label.textColor = color;
    return label;
}

+ (instancetype)wy_labelWithText:(NSString *)text lightFontWithSize:(CGFloat)fontSize color:(UIColor *)color
{
    UILabel *label = [[self alloc] init];
    
    label.text = text;
    label.font = [UIFont lightFontWithSize:fontSize];
    label.textColor = color;
    return label;
}

+ (instancetype)wy_borderLabelWithText:(NSString *)text regularFontWithSize:(CGFloat)fontSize titleColor:(UIColor *)color borderColor:(UIColor *)borderColor
{
    UILabel *label = [[UILabel alloc] init];
    label.text = text;
    label.font = [UIFont regularFontWithSize:fontSize];
    label.textColor = color;
    [label.layer setBorderColor:color.CGColor];
    [label.layer setBorderWidth:1];
    [label.layer setCornerRadius:2];
    [label.layer setMasksToBounds:YES];
    return label;
}


@end
